package comb;

import java.util.Scanner;

/**
 * @Author LiangLing
 * @Description TODO
 * @Date 2019/11/23
 **/
public class Comb {


    public static void main(String[] args) {

        Scanner sc  =new Scanner(System.in);
        System.out.println("请输入你要排序的内容，用中文逗号分隔");
        String string  = sc.nextLine();
        String [] strings =string.split("，");
        int size=1;
        for(int i=0;i<strings.length;i++){
            size =size+calcCombLength(i+1,strings.length);
        }

       String [][] str  = new String[size][string.length()];

    }

    /**
     * 递归求阶乘
     * @param m
     * @return
     */
    private static int factorial(int m){
        if(m==1){
            return 1;
        }else{
            return m*factorial(m-1);
        }
    }

    /**
     * 求数字n取m组合的和
     * @param m
     * @param n
     * @return
     */
    private static int calcCombLength(int m,int n){
        return n>m ? factorial(n)/(factorial(m)*factorial(n-m)):0;

    }




}
